Skip to content

fix(xl-email-exporter): better defaults, customize textStyles, output inline styles #1856

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 10 commits into
base: main
Choose a base branch
from

Conversation

nperez0111
Copy link
Contributor

@nperez0111 nperez0111 commented Jul 18, 2025

This fixes an issue where the outputted color was the raw color string which happened to work for simple values like red, but did not output the exact color value that the user specified

Key Changes:

Customization and Styling Enhancements:

  1. Configurable Text Styles for React Email Blocks:

    • Introduced ReactEmailTextStyles type and defaultReactEmailTextStyles for defining default and customizable styles for text components like paragraphs, headings, and lists. (packages/xl-email-exporter/src/react-email/defaultSchema/blocks.tsx) [1] [2]
    • Updated block mappings to apply these styles dynamically, allowing users to override defaults. [1] [2] [3] [4] [5] [6] [7]
  2. Customizable Color Schemes:

    • Added support for light and dark mode color schemes using COLORS_DARK_MODE_DEFAULT and COLORS_DEFAULT. (examples/05-interoperability/08-converting-blocks-to-react-email/src/App.tsx) [1] [2]
  3. Enhanced Container Customization:

    • Added a container option to wrap email content with a customizable component. (docs/content/docs/features/export/email.mdx)
  4. New API for Custom Styles:

    • Introduced reactEmailDefaultSchemaMappingsWithStyles for creating schema mappings with custom styles. (docs/content/docs/features/export/email.mdx, packages/xl-email-exporter/src/react-email/defaultSchema/index.ts) [1] [2]

Copy link

vercel bot commented Jul 18, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
blocknote ❌ Failed (Inspect) Jul 24, 2025 11:17am
blocknote-website ✅ Ready (Inspect) Visit Preview Jul 24, 2025 11:17am

Copy link

pkg-pr-new bot commented Jul 18, 2025

Open in StackBlitz

@blocknote/ariakit

npm i https://pkg.pr.new/TypeCellOS/BlockNote/@blocknote/ariakit@1856

@blocknote/code-block

npm i https://pkg.pr.new/TypeCellOS/BlockNote/@blocknote/code-block@1856

@blocknote/core

npm i https://pkg.pr.new/TypeCellOS/BlockNote/@blocknote/core@1856

@blocknote/mantine

npm i https://pkg.pr.new/TypeCellOS/BlockNote/@blocknote/mantine@1856

@blocknote/react

npm i https://pkg.pr.new/TypeCellOS/BlockNote/@blocknote/react@1856

@blocknote/server-util

npm i https://pkg.pr.new/TypeCellOS/BlockNote/@blocknote/server-util@1856

@blocknote/shadcn

npm i https://pkg.pr.new/TypeCellOS/BlockNote/@blocknote/shadcn@1856

@blocknote/xl-ai

npm i https://pkg.pr.new/TypeCellOS/BlockNote/@blocknote/xl-ai@1856

@blocknote/xl-docx-exporter

npm i https://pkg.pr.new/TypeCellOS/BlockNote/@blocknote/xl-docx-exporter@1856

@blocknote/xl-email-exporter

npm i https://pkg.pr.new/TypeCellOS/BlockNote/@blocknote/xl-email-exporter@1856

@blocknote/xl-multi-column

npm i https://pkg.pr.new/TypeCellOS/BlockNote/@blocknote/xl-multi-column@1856

@blocknote/xl-odt-exporter

npm i https://pkg.pr.new/TypeCellOS/BlockNote/@blocknote/xl-odt-exporter@1856

@blocknote/xl-pdf-exporter

npm i https://pkg.pr.new/TypeCellOS/BlockNote/@blocknote/xl-pdf-exporter@1856

commit: 8176fc8

@nperez0111 nperez0111 changed the title fix: correctly output colors in emails fix(xl-email-exporter): better defaults, customize textStyles, output inline styles Jul 28, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant